<?php

namespace app\admin\controller\member;

use app\admin\service\OptionsChannelService;
use ShidianUtil\Thinkphp\Response\ApiResponse;
use think\APP;
use think\Request as Request;

/**
 * OptionsChannel 控制器
 * Class OptionsChannel
 * @package app\member\controller
 * @link https://www.kancloud.cn/manual/thinkphp6_0/1037509
 */
class OptionsChannel
{
    private Request $request;

    private OptionsChannelService $service;

    public function __construct(Request $request, OptionsChannelService $optionsChannelService)
    {
        $this->request = $request;
        $this->service = $optionsChannelService;
    }

    /**
     * 列表
     * @return ApiResponse
     * @url /member/options_channel/index
     */
    public function index(): ApiResponse
    {
        $request = $this->request;

        return ApiResponse::success($this->service->index());
    }

}
